package org.raymond.iworks.admin.service;

import org.raymond.iworks.apis.vo.role.RoleCreateVO;
import org.raymond.iworks.apis.vo.role.RoleDelVO;
import org.raymond.iworks.apis.vo.role.RoleInfoVO;
import org.raymond.iworks.apis.vo.role.RoleUpdateVO;
import org.raymond.iworks.repository.IService;
import org.raymond.iworks.repository.entity.TSysRole;

import java.util.List;
import java.util.Set;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public interface ITSysRoleService extends IService<TSysRole> {

    /**
     * 获取角色的所有子级角色
     * @return
     */
    List<TSysRole> getsChildRole(Set<Long> roleIdSet);

    /**
     * 获取用户的角色,以便获取权限
     * @param userId
     * @return
     */
    List<TSysRole> getsAssociatedRoleByUserId(Long userId);

    boolean save(RoleCreateVO vo);

    boolean update(RoleUpdateVO vo);

    boolean removeById(RoleDelVO vo);

    RoleInfoVO getById(Long id);
}
